<!DOCTYPE html>
<html>
<head>
    <title>黑名单手动添加</title>
    <#include "/common/import.ftl" >
    <script type="text/javascript" src="${ctx}/js/utiltools.js"></script>
    <script type="text/javascript" src="${ctx}/js/easyui/extendvalidate.js"></script>
    <script type="text/javascript">
        var inputForm = '#inputForm';
        $(function () {
            //执行保存操作
            $(inputForm).form({
                success: function (data) {
                    var result = jQuery.parseJSON(data);
                    if (result.flag == 'T') {
                        $.messager.alert('提交结果', result.msg, 'info', function () {
                            parent.colseAdd();// 关闭添加窗口
                            parent.brReload();// 刷新列表
                        });
                    } else {
                        $.messager.alert('提交结果', '操作失败', 'error');
                    }
                },
                error: function (messg) {
                    $.messager.alert('错误提示', '与服务器连接异常', 'error');
                }
            });
        });

        //执行表单提交操作
        function doSubmit() {
            var flag = $(inputForm).form('validate');
            if (flag) {
                $(inputForm).submit();
            }
        }
    </script>
</head>
<body>
<form id="inputForm" name="inputForm" method="post" action="${ctx}/passport/black/save.action">
    <input type="hidden" name="brId" id="brId" value="${item.brId!''}"/>
    <input type="hidden" name="isAdd" id="isAdd" value="${isAdd!''}"/>
    <table class="datagrid-body" style="font-size: 12px;">
        <tr>
            <td class="datagrid-header">冻结IP地址<font color=red>*</font></td>
            <td>
                <input id="brIpaddress" name="brIpaddress" value="${item.brIpaddress!''}"
                       class="easyui-validatebox" data-options="required:true,validType:'ip'"
                       size="20"
                       missingMessage="请输入要冻结的IP地址"/>
            </td>
        </tr>
        <tr>
            <td class="datagrid-header">冻结账户</td>
            <td>
                <input id="brAccount" name=brAccount value="${item.brAccount!''}"
                       class="easyui-validatebox" data-options="required:false" size="20"
                       missingMessage="请输入要冻结的账户"/>
            </td>
        </tr>
        <tr>
            <td class="datagrid-header">冻结备注</td>
            <td>
					<textarea name="brRemark" id="brRemark" class="easyui-validatebox" size="40"
                              missingMessage="请输入冻结理由" data-options="required:true"
                              cols="40" rows="4"
                    >${item.brRemark!''}</textarea>
            </td>
        </tr>
        <tr>
            <td class="datagrid-header"></td>
            <td>
                <a href="#" class="easyui-linkbutton" id="bt1" iconCls="icon-save"
                   onclick="doSubmit();">提交</a>
                <a href="#" class="easyui-linkbutton" iconCls="icon-cancel"
                   onclick="parent.colseAdd();" ;>取消</a>
            </td>
        </tr>
    </table>
</form>
</body>
</html>
